<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=">
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUBLIC__/Admin/css/css.css">
<script src="__PUBLIC__/Admin/js/jquery-1.9.1.js"></script>
<script src="__PUBLIC__/Common/Layer/layer.js"></script>
<script src="__PUBLIC__/Common/Layer/extend/layer.ext.js"></script>
<script src="__PUBLIC__/Common/My97Date/WdatePicker.js"></script>

<script>
//查看详情
	function look_detail(id){
		parent.layer.open({
			type: 2,
			title: '订单',
			shadeClose: true,
			shade: 0.5,
			maxmin: true,
			area: ['80%', '90%'],
			content: "{:U('Tourism/order_lst_detail')}?id="+id //iframe的url
		});
	}

	//删除用户
	function del(id){
		$("#del"+id+" td").css('background','#CBDFF2');
		parent.layer.confirm('真的要删除吗？', {
			btn: ['确认','取消'], //按钮
			shade: 0.5 //显示遮罩
		}, function(){
			$.post("{:U('Goods/goods_orders_del')}", { "id": id},function(data){
				if(data == 1){
					parent.layer.msg('删除成功', { icon: 1, time: 1000 }, function(){
							$("#del"+id).remove();
						});
				}else{
					parent.layer.msg('删除失败', {icon: 2, time: 2000 }); 
				}
			}, "json");
		},function(){
			$("#del"+id+" td").css('border-top','0');
			$("#del"+id+" td").css('border-bottom','1px solid #EFEFEF');
		});
	}
</script>
</head>
<body>
<style>
	.tr_content {
		line-height: 32px;
		height:32px;
		font-size: 14px;
	}
	
	.layui-layer-title{
		font-weight:bold;
	}
</style>
<div class="nav">
	<div class="nav_title">
    	<h4><img class="nav_img" src="__PUBLIC__/Admin/img/tab.gif" /><span class="nav_a">用户管理 - 商城订单列表</span></h4>
    </div>
</div>

<form action="__SELF__" method="get">
	<div class="search" style=" line-height:50px; padding-left:30px; margin-top:3px;">
		订单编号：<input type="text" class="input" name="orders_num" value="{$_GET['orders_num']}" maxlength="30" size="20" />
		  &nbsp;&nbsp;
		 手机号： <input type="text" class="input" name="mobile" value="{$_GET['mobile']}" maxlength="30" size="20" />
			&nbsp;&nbsp;
		<button type="submit" class="button">查 询</button>

		<!--<button type="button" class="button" onClick="export_orders();" style="background:#146AC1;">批量导出订单</button>-->
	</div>
</form>

<div class="list">
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
      <thead>
	    <tr>
	      <td width="9%"><div align="center">ID</div></td>

	      <td width="14%"><div align="center">订单编号</div></td>

	      <td width="13%"><div align="center">联系人&amp;手机</div></td>

	      <td width="15%"><div align="center">订单状态</div></td>
	      <td width="12%"><div align="center">下单时间</div></td>
		  <td width="13%"><div align="center">操作</div></td>

        </tr>
        </thead>
        <tbody>
        <foreach name="res" item="vo">
	  		<tr id="del{$vo.id}" class="tr_content" onmouseover="$(this).css('color','red')" onmouseleave="$(this).css('color','#555')">
	  		  <td width="9%" style="height: 40px"><div align="center">{$vo.id}</div></td>
			

				<td width="14%"><div align="center">{$vo.orders_num}</div></td>

				<td><div align="center">{$vo.realname}<br/>{$vo.mobile}</div></td>

				<td width="15%">
				   <div align="center">待支付</div>
				</td>
				<td width="12%"><div align="center">{$vo.create_time|date='Y-m-d H:i:s',###}</div></td>
				<td width="13%">
				<div align="center">

				<a href="javascript:void (0);" style=" background-color: #146AC1; padding: 8px; border-radius: 4px; color: #ffffff" onclick="look_detail({$vo.id})">详情</a>
<a class="a_button" href="javascript:;" onclick="del({$vo[id]})">删除</a>
				</div>
				</td>
			</tr>

        </foreach>
        </tbody>
  </table>
</div>

<!-- 分页 -->
<div class="page">
{$page}
</div>


</body>
</html>
